import type { LibrarySize } from '@/api/modules/data/library.size';
import type { Rule } from 'ant-design-vue/es/form';

const formObj: LibrarySize = {
  sizeId: '',
  sizeDesc: '',
  width: 0,
  height: 0,
  createTime: '',
};
export const form = ref({
  ...formObj,
});

export const formRef = ref();

export const resetForm = () => {
  form.value = {
    ...formObj,
  };
};
export const formRules: Record<string, Rule[]> = {
  sizeId: [
    {
      required: true,
    },
  ],
  sizeDesc: [
    {
      required: true,
    },
  ],
  width: [
    {
      required: true,
    },
  ],
};
